home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Commodities / Clipbook / Clipbook.doc next >
Text File  |  1996-09-26  |  18KB  |  469 lines

  1.  
  2.                   ClipBook V1.2  © 1994 Nick Portalski
  3.                  =======================================
  4.  
  5. Overview
  6. ========
  7.  
  8. I spent a couple of summers working on Macs writing documentation.  One of
  9. the most useful tools was the Mac Scrapbook, which allows you to store any
  10. number of 'clips' (text and graphics) and then copy any one to the clipboard 
  11. so you can paste it into applications.  Items were placed in the scrapbook 
  12. via the normal cut'n'paste keys.  In fact, I liked it so much that I wrote 
  13. this -  Amiga Clipbook commodity.
  14.  
  15. So, the Clipbook allows you to store text and graphics clips, scan through
  16. them and copy any of them to the standard Amiga clipboard.  They can then 
  17. be pasted into applications.  To put something into the Clipbook you simply
  18. have to copy it from an application and paste it into the Clipbook.
  19.  
  20. Because the Clipbook visually displays a clip you won't ever waste time
  21. by loading the wrong picture or needing to print them all out.
  22.  
  23. This is useful for logos, 'standard' blocks of text, graphics you use
  24. often etc etc.  If you use a particular graphics brush often then instead of
  25. having to load it (and remember the path!) each time you can simply store
  26. it in the clipboard and copy it out each time you need it. 
  27.  
  28. It is important to remember that this will only work with applications
  29. which use the standard Amiga Clipboard. (DPaint AGA, Ced, FinalWriter
  30. the SAS/C SE editor etc).
  31.  
  32.  
  33. Improvments since V1.0
  34. ======================
  35.  
  36. You can now load a clip into the Clipbook from a file.  This is useful
  37. if, say, your graphics program doesn't use the Amiga clipboard.
  38.  
  39. The current clip number is held even when you close the window.  This means
  40. you won't be taken to the first clip every time the window is opened.
  41.  
  42. Proper FTXT handling (Especially useful for FinalWriter text.....)
  43.  
  44. Extra info about non-standard clips displayed.
  45.  
  46. Added in a few more keys 'cos someone asked me to.
  47.  
  48.  
  49. Improvements since V1.1
  50. =======================
  51.  
  52. Added detection of D2RD clips. Hope to actually draw them soon....
  53.  
  54. Added AutoPaste.  If this is turned on then Clipbook will monitor the
  55. clipboard.  When something is pasted into the clipboard it will
  56. automatically be inserted into the Clipbook.  Useful if you're trying
  57. to get a lot of clips into the Clipbook at once.
  58.  
  59. You can now give name clips.
  60.  
  61. The Paste menu item is now ghosted when there's nothing in the 
  62. clipboard.
  63.  
  64. You can now specify different viewers for ilbm/ftxt/other clips
  65.  
  66. Fixed some enforcer hits! As far as I know there are no hits now!
  67. (All bug reports to e-mail at end.....)
  68.  
  69.  
  70. Distribution
  71. ============
  72.  
  73. All code is Copyright 1994 Nick Portalski.  It may be copied and distributed 
  74. so long as no commercial profit is made out of it.  It may not be modified, 
  75. sold, or included in any commercial distribution without my written 
  76. permission. Public Domain vendors are not allowed to sell this program for 
  77. more than the price of a regular disk, which should be no more than the 
  78. equivalent of 5 Dollars. (It may be placed on CD-ROM collections costing
  79. more than this). The author takes no responsibility for any loss or damage 
  80. resulting from the use of this program.
  81.  
  82. This distribution should contain the following files:
  83.  
  84.     ClipBook1.2
  85.     ClipBook1.2.info
  86.     ClipBook.doc
  87.     ClipBook.doc.info
  88.     ClipBook.guide
  89.     ClipBook.guide.info
  90.     iff.library
  91.  
  92.  
  93. Requirements
  94. ============
  95.  
  96. * Workbench 2.xx+
  97.  
  98. * The iff.library by Christian Weber (included in archive).
  99.  
  100. * Although Clipbook will run happily from floppy it has been designed with 
  101.   hard drive users in mind.
  102.  
  103.  
  104. Installation
  105. ============
  106.  
  107. Clipbook is a commodity - so you can either copy it into the WBStartup 
  108. directory or simply run it when you need it.  As it uses tooltypes stored
  109. in the icon you must copy the .info file too.  If you want to display
  110. ILBM pictures in the clipbook you must copy iff.library to your libs:
  111. directory. Clipbook should only be used from the Workbench.
  112.  
  113. You should also decide where you want clips to be stored.  I suggest
  114. you create a new directory.  Specify the path to this directory in
  115. the icon's CLIPDIR tooltype. (See Options below).
  116.  
  117. When you first run the Clipbook you will be asked "Can't find .cliprc.
  118. Create new one?"  Answer "Yes" - this creates a control file required
  119. in the CLIPDIR.  See Additional Notes for more information.
  120.  
  121.  
  122. Usage
  123. =====
  124.  
  125. Once run the Clipbook window will appear when you press the hotkey specified
  126. in the tooltype. (Or use the Commodity Exchange program to show its 
  127. interface).  By default it appears on the Workbench screen, but you can 
  128. force it to appear on other screens. (See Options below).
  129.  
  130. The main part of the window shows the current 'clip', with the rest being 
  131. made up of gadgets.
  132.  
  133. The slider gadget at the bottom allows you to move through all the clips
  134. in the clipbook.  The text below the clip gives you information about the
  135. clips (i.e. what type it is) and how many clips there are in total.
  136.  
  137. The 'View Scrap' button will launch the VIEWER program you have specified
  138. in the tooltypes (see Options below) for the current clip type.  This is the 
  139. best way to see a clip in full, as the window only displays a small portion.
  140. Also, the Clipbook will not try to work out the colours of ILBM clips, 
  141. whereas a viewer such as Multiview will.  You can specify different viewers
  142. for FTXT (text), ILBM (graphics) and other clips. See Options below.
  143.  
  144. The 'Name' string allows you to enter up to 64 characters for a clip's
  145. name.  This is extremely useful for clips which Clipbook can't
  146. display (e.g. FinalWriter grapics) as you can still identity them!
  147.  
  148. To close the Clipbook click on the window's close gadget.  The Clipbook will
  149. remain resident and can be displayed with the hotkey again.  The 'Remove'
  150. button will close the Clipbook window *and* remove it from memory, whereas
  151. 'Hide' will simply close the window and leave Clipbook resident.
  152.  
  153. There are 2 menus:
  154.  
  155. The first is fairly straightforward:
  156.  
  157.     Project -> Next Clip     :  Moves to the next clip in the clipbook
  158.     Project -> Previous Clip :  Move to the previous clip in the clipbook
  159.  
  160.     Project -> AutoPaste     :  With this option turned on anything copied
  161.                                 to the clipboard will automatically be
  162.                                 inserted into the Clipbook. (EXCEPT items
  163.                                 which are copied from the Clipbook itself)
  164.  
  165.     Project -> Load Clip From File : See below.
  166.     
  167.     Project -> Remove        :  Removes the Clipbook from memory
  168.     Project -> Hide          :  Closes the Clipbook window, but leaves the
  169.                                 program resident.
  170.  
  171. Load Clip From File : Although text programs have used the Amiga clipboard
  172.                       for some time, a certain well-known graphics program
  173.                       has only just started using it.  On earlier versions it
  174.                       was impossible to get graphics clips into the Clipbook.
  175.                       However, selecting this menu option will prompt you
  176.                       for a file.  Select any IFF file (e.g. graphics)
  177.                       and it will load it and paste it into the Clipbook.
  178.                       This function does make some basic checks on the 
  179.                       file to check it's IFF, but it is possible to fool it.
  180.  
  181. The second menu is used to paste items into the Clipbook and to copy them 
  182. out. This uses the standard Amiga Clipboard, and the menu shortcut keys are
  183. the ones you'd expect for Cut/Copy/Paste.
  184.  
  185. In general, to place something into the Clipbook, 'Copy' it to the clipboard
  186. in an application, switch to the Clipbook and select 'Paste'.  The item will
  187. be added to the Clipbook at the current position. (It *doesn't* overwrite
  188. anything).
  189.  
  190. To get a clip from the Clipbook to an Application you have two choices.
  191. 'Copy' places a copy of the current clip in the Clipboard.  You can then 
  192. go to an application and choose Paste.  Alternatively 'Cut' will remove
  193. the current clip from the Clipbook and place it in the Clipboard.
  194.  
  195. Clear deletes the current clip without affecting the clipboard.
  196.     
  197. However, to copy from or paste to an application that application must
  198. support the standard Amiga clipboard.  Fortunately more and more are.
  199.  
  200.  
  201. Other Keys
  202. ==========
  203.  
  204. As well as the menu short-cut keys there are 5 others:
  205.  
  206. Cursor Left -   Next Clip
  207. Cursor Right-   Previous Clip
  208. Cursor Up       Last Clip
  209. Cursor Down     First clip
  210.  
  211. Return          Copy current clip to clipboard and close Clipbook window
  212.  
  213. Combined with the hotkey these make getting a clip out of the Clipbook
  214. very quick and easy, as they're all one-key operations.
  215.  
  216.  
  217. Options
  218. =======
  219.  
  220. All options are given via the tooltypes of Clipbook's icon.  If not
  221. present default values are used:
  222.  
  223. CX_POPUP    :  If 'YES' the Clipbook Window will open when the program 
  224.                is run. Default = NO
  225.  
  226. CX_POPKEY   :  Hotkey to open the Clipbook Window. 
  227.                Default is Control Left Alt s
  228.  
  229. CLIPDIR     :  The name of the directory where clips are to be stored.  If
  230.                not present the Clipbook will default to CLIPS:, but this is
  231.                usually assigned to RAM:, so clips will not be permanent.
  232.  
  233.                If the specified directory doesn't exist you'll be informed
  234.                and the program will quit when you try to open the window.
  235.  
  236.                If there is no .cliprc file in the specified directory you
  237.                will be asked if you want to create an (empty) one.  
  238.                Answering 'No' will quit the program as it can't run without
  239.                a .cliprc!
  240.  
  241. ILBM_VIEWER :  The name of the graphics viewer to be run when the 
  242.                'View Scrap' button is pressed and the current clip is ILBM.  
  243.                This should include the full path and any arguments to the 
  244.                viewer.  
  245.  
  246.                For example, I use:
  247.  
  248.                          'sys:utilities/multiview SCREEN'
  249.  
  250.                Default is sys:utilities/multiview SCREEN
  251.  
  252. TEXT_VIEWER :  As ILBM_VIEWER but used to view FTXT clips.
  253.  
  254. VIEWER      :  As above but used for any clips which aren't ILBM or FTXT.
  255.  
  256. PUBLICSCREEN:  The name of the Publicscreen the Clipbook is to open on.  If
  257.                this isn't specified or the specified screen doesn't exist
  258.                Workbench is used.
  259.  
  260. FORCETOFRONT:  If this tooltype is present the Clipbook will always open on
  261.                the frontmost screen when the hotkey is pressed - regardless
  262.                of whether it's a publicscreen or not.  Obviously this can be
  263.                very useful but does carry dangers.  The program which opened
  264.                the screen may not be expecting a window to open and you must
  265.                never try to quit the screen's program before closing the 
  266.                Clipbook window.  I cannot guarantee correct operation of the
  267.                Clipbook when forced to open on the frontmost screen.  It does
  268.                seem to work with Ced (with system scrolling routines), 
  269.                Devpac, FinalWriter, FinalCopy, ProPage and to some extent 
  270.                DPaint.
  271.  
  272.                Default is not to force to front.
  273.  
  274. AUTOPASTE:     This determines the initial state of the AutoPaste menu item.
  275.  
  276.  
  277. Clips Supported
  278. ===============
  279.  
  280. You can actually paste any type of 'Clip' from the Amiga Clipboard
  281. into the Clipbook.  However, it will currently only display two types.
  282.  
  283. FTXT:   This is standard text.
  284.  
  285. ILBM:   This is graphics.  You'll need iff.library for this to work.
  286.  
  287. SWRT:   The type of clip is used by Softwood (e.g. FinalWriter).  The
  288.         Clipbook can store these but can't currently display them.
  289.         So, for example, you can draw some structured graphics in 
  290.         FinalWriter, select them, select 'Copy' and then launch the Clipbook.
  291.         You can now use 'Paste', and the clipbook will tell you it can't 
  292.         display it. You can copy/cut it later though and paste it back into 
  293.         FinalWriter.
  294.  
  295. D2RD:   This is the IFF structured drawing.  Again, Clipbook doesn't
  296.         currently display the clip.
  297.  
  298. UNKN:   The Clipbook doesn't recognise the clip, but can store it.
  299.  
  300. NIFF:   (Not IFF) You shouldn't see this type, as all clips must be IFF to
  301.         be stored in the Amiga clipboard.  It therefore indicates that
  302.         something has gone wrong with a file in the CLIPDIR.
  303.  
  304. In the UNKN case the Clipbook will display additional information.  This
  305. information is the identifier of the first 'chunk' in the clip.  This may
  306. help you remember which application it came from.
  307.  
  308. There is an additional complication.  When storing FTXT (text) in a clip
  309. an application such as FinalWriter needs to store additional information
  310. such as typeface, style etc.  When you try and paste this into another
  311. application you may not get all the text.  The Clipbook parses FTXT 
  312. properly and displays all the text, but if it thinks there is additional
  313. information in the clip it will display something in brackets after the 
  314. FTXT.  For example, if I copy some text from FinalWriter to the Clipbook
  315. it shows:
  316.  
  317.         FTXT (FCCH)
  318.  
  319. This tells you where it's come from and that other applications may not
  320. understand it.
  321.  
  322.  
  323. Additional Notes
  324. ================
  325.  
  326. Each clips stored in the clipbook is stored as a file.  All these files
  327. are stored in the CLIPDIR (see Options below).  A 'control' file called
  328. .cliprc is also stored in this directory, which keeps count of the total
  329. number of clips.  If the program can't find this .cliprc file it will ask
  330. you if you want to create a new one with 0 entries.  If the CLIPDIR is
  331. invalid the program will quit.
  332.  
  333. You can alter the contents of the CLIPDIR and the .cliprc if you really want
  334. to - but I wouldn't suggest it.  If for some reason the .cliprc file is
  335. deleted you can easily re-initialise it to the number of clips in the
  336. directory.  Simply cd to the CLIPDIR and type:
  337.  
  338.     echo >.cliprc "X"
  339.  
  340. Where X is the number of clips in the directory.
  341.  
  342. Also, be aware that although I can force the Clipbook to open on the 
  343. frontmost screen I can't force the viewer run with the 'View Scrap' button 
  344. to do the same.  If you think this isn't working try taking a look at the 
  345. Workbench screen to see if the viewer's window has appeared there. (Although
  346. Multiview will autmoatically bring it's screen to the front).
  347.  
  348.  
  349. The History of ClipBook
  350. ========================
  351.  
  352. Version 1.0     First Public Release
  353. (14th June 94)
  354.  
  355. Version 1.1     Made a buffer bigger due to bug in older versions of FGets()
  356. (27th June 94)                
  357.                 Fixed bug when allocating bitmaps. (Probably only affects AGA
  358.                 machines)  This was probably causing the bug I was blaming on
  359.                 DPaint!
  360.  
  361.                 Added 'Load Clip from File'.
  362.  
  363.                 The current clip number is now held even when you close the 
  364.                 window.  This means it starts where you left off.
  365.     
  366.                 Improved FTXT handling.  This now uses iffparse.library.  
  367.                 FinalWriter FTXT clips (normal text) now display properly.
  368.                 However, other applications may not paste the whole clip as
  369.                 FinalWriter may store the text as many chunks in the file.
  370.                 I will add a 'Convert to simple FTXT' feature in future
  371.                 versions.
  372.  
  373.                 Extra information about clips is now displayed, which is
  374.                 helpful especially for clips of type UNKN.
  375.  
  376.                 Fixed bug when opening on a publicscreen.  I was releasing 
  377.                 the lock too early.... (Though the chances of this one ever 
  378.                 occuring were tiny!).
  379.  
  380.                 Made it use NewLookMenus under 3.0->.
  381.  
  382.                 Added Cursor Left, Right, Up, Down and Return (Copy and Hide)
  383.  
  384. Version 1.2        Added detection of D2RD clips. Hope to actually draw them soon....
  385. (Sep-Oct '94)
  386.                 Added AutoPaste
  387.  
  388.                 Added Naming Clips
  389.  
  390.                 Paste menu item now ghosted when there's nothing in the clipboard
  391.  
  392.                 Added ability to specify different viewers for ilbm/ftxt/other clips
  393.  
  394.                 Fixed some enforcer hits!
  395.  
  396. Known Bugs
  397. ==========
  398.  
  399. The font adaptive routines (as generated by Gadtoolsbox) aren't great - 
  400. and if you use strange fonts you may find some of the text overlapping
  401. the gadgets.  I will try to sort this out in future versions.
  402.  
  403. There are risks with opening windows on non-publicscreens.  To be safe
  404. ONLY use the Clipbook when it's open on a non-publiscscreen; don't try and
  405. use the application owning the screen whilst the clipbook is open.
  406.  
  407.  
  408. Future of Clipbook
  409. ==================
  410.  
  411. There are several things I want to do with Clipbook.  The first is to be able
  412. to display Softwood clips (e.g. from FinalWriter).  I also hope to add
  413. structured IFF drawings, EPSF displaying  and an AREXX port so that utilities
  414. such as Snap can cut directly to the Clipbook.  This means many screenshots 
  415. could be captured to the Clipbook, which is useful if you're writing a 
  416. manual.
  417.  
  418. I want to have an index of names the user can look clips up in
  419.  
  420. Make the window re-sizeable.......
  421.  
  422. Oh yeah, if you've got over about 30 clips pasting a new one in can take
  423. a few seconds whilst the CLIPDIR is shuffled about.  At some point I'll
  424. try to improve on this.
  425.  
  426.  
  427. Thanks To
  428. =========
  429.  
  430. * The authors of GadToolsBox.
  431.  
  432. * Christian Weber for iff.library
  433.  
  434. * Mark McPherson for the startup code.
  435.  
  436. * Matt Jennings for the use of his A3000 (so I could run Enforcer).
  437.  
  438. * Marcel Offermans for suggesting the functionality of the return key.
  439.  
  440.  
  441. Not Only But Also......
  442. ========================
  443.  
  444. This version of Clipbook is free - although if you do use it I'd appreciate 
  445. somthing to help encourage future updates!  
  446.  
  447. I would especially like to hear about any applications whose clips it doesn't
  448. recognise.  Sending me an example clip would be very helpful - even the first
  449. page of the output from "type xxxx hex" would be good.
  450.  
  451. I welcome all bug reports, comments and suggestions and can be contacted
  452. by any of the following means:
  453.  
  454. e-mail:     nick@ripple.demon.ac.uk
  455.  
  456. snail-mail: Nick Portalski
  457.             24, Scotland Farm Road
  458.             Ash Vale
  459.             Aldershot
  460.             Hants
  461.  
  462.             GU12 5JB
  463.  
  464. I hope you find it useful!
  465.  
  466. --
  467. Nick Portalski 
  468. November 1994
  469.